# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 88
n 88(None)[return None
]:
	i: 24(), 74()
	o: 

nname: 74
n 74(None)[log.debug("WyScanServer can't be found, tv setup parameters are disabled.")
]:
	i: 0(f)
	o: 88()

nname: 24
n 24(None)[from WyScan import WYScanServer
self.wyscanserver = WYScanServer(strBusName='com.wyplay.wyscan', strPathName='/com/wyplay/WyScan', strWyDbusInstanceName='com.wydbus.wyscan_4_gui')
]:
	i: 0(t)
	o: 88()

nname: 0
n 0('tv' in config.plugins)[self.wyscanserver = None
]:
	i: 
	o: 24(t), 74(f)

nname: 0
n 0(None)[self.wyscanserver = None
if 'tv' in config.plugins:
	from WyScan import WYScanServer
	self.wyscanserver = WYScanServer(strBusName='com.wyplay.wyscan', strPathName='/com/wyplay/WyScan', strWyDbusInstanceName='com.wydbus.wyscan_4_gui')
else:
	log.debug("WyScanServer can't be found, tv setup parameters are disabled.")
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb762654c>}
nname: 6
n 6(None)[__metaclass__ = MetaSingleton
def __init__(self):
	self.wyscanserver = None
	if 'tv' in config.plugins:
		from WyScan import WYScanServer
		self.wyscanserver = WYScanServer(strBusName='com.wyplay.wyscan', strPathName='/com/wyplay/WyScan', strWyDbusInstanceName='com.wydbus.wyscan_4_gui')
	else:
		log.debug("WyScanServer can't be found, tv setup parameters are disabled.")
	return None

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb7622d8c>}
nname: 0
n 0(None)[return _WyScanServerWrap().wyscanserver
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7622aec>}
nname: 24
n 24(None)[return TVSetupParametersItem(_('TV'), 'tv', display_type='setup_tv', menu=menu)
]:
	i: 15(), 23()
	o: 

nname: 23
n 23(None)[]:
	i: 0(f)
	o: 24()

nname: 15
n 15(None)[return None
]:
	i: 0(t)
	o: 24()

nname: 0
n 0(wyscanserver() is None)[]:
	i: 
	o: 15(t), 23(f)

nname: 0
n 0(None)[if wyscanserver() is None:
	return None
return TVSetupParametersItem(_('TV'), 'tv', display_type='setup_tv', menu=menu)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7622fec>}
nname: 0
n 0(None)[from .tvsetup import EPGMarginItem, TNTScanMenuSetupItem, ExternalAntenna
return [EPGMarginItem('tv', 'epg_margin', config.HMI_TV['epg_margins'], 'Time record margins', type_='setupitem'), TNTScanMenuSetupItem('Channel search', type_='setupitem', menu=self.menu), ExternalAntenna('tv', 'lnb_high_voltage', (True, False), 'External antenna', type_='setupitem')]
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb762680c>}
nname: 0
n 0(None)[self._name = _('TV')
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb762628c>}
nname: 6
n 6(None)[def browse(self):
	from .tvsetup import EPGMarginItem, TNTScanMenuSetupItem, ExternalAntenna
	return [EPGMarginItem('tv', 'epg_margin', config.HMI_TV['epg_margins'], 'Time record margins', type_='setupitem'), TNTScanMenuSetupItem('Channel search', type_='setupitem', menu=self.menu), ExternalAntenna('tv', 'lnb_high_voltage', (True, False), 'External antenna', type_='setupitem')]

def update_name(self):
	self._name = _('TV')

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb7622fac>}
nname: 0
n 0(None)[from __future__ import absolute_import
from .. import ParametersSetupItem
from ...containers import GenericContainer
from peewee.debug import PRINT_EXCEPTION, DEBUG, GET_LOGGER
from pygui.item.core import Item
from peewee.misc_utils import MetaSingleton
from pygui.item.core import Item
import pygui.config as config
log = GET_LOGGER(__name__)
class _WyScanServerWrap(object):
	__metaclass__ = MetaSingleton
	def __init__(self):
		self.wyscanserver = None
		if 'tv' in config.plugins:
			from WyScan import WYScanServer
			self.wyscanserver = WYScanServer(strBusName='com.wyplay.wyscan', strPathName='/com/wyplay/WyScan', strWyDbusInstanceName='com.wydbus.wyscan_4_gui')
		else:
			log.debug("WyScanServer can't be found, tv setup parameters are disabled.")
		return None



def wyscanserver():
	return _WyScanServerWrap().wyscanserver

def getitem(menu):
	if wyscanserver() is None:
		return None
	return TVSetupParametersItem(_('TV'), 'tv', display_type='setup_tv', menu=menu)

class TVSetupParametersItem(GenericContainer):
	def browse(self):
		from .tvsetup import EPGMarginItem, TNTScanMenuSetupItem, ExternalAntenna
		return [EPGMarginItem('tv', 'epg_margin', config.HMI_TV['epg_margins'], 'Time record margins', type_='setupitem'), TNTScanMenuSetupItem('Channel search', type_='setupitem', menu=self.menu), ExternalAntenna('tv', 'lnb_high_voltage', (True, False), 'External antenna', type_='setupitem')]

	def update_name(self):
		self._name = _('TV')



]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7618d6c>}
from __future__ import absolute_import
from .. import ParametersSetupItem
from ...containers import GenericContainer
from peewee.debug import PRINT_EXCEPTION, DEBUG, GET_LOGGER
from pygui.item.core import Item
from peewee.misc_utils import MetaSingleton
from pygui.item.core import Item
import pygui.config as config
log = GET_LOGGER(__name__)
class _WyScanServerWrap(object):
	__metaclass__ = MetaSingleton
	def __init__(self):
		self.wyscanserver = None
		if 'tv' in config.plugins:
			from WyScan import WYScanServer
			self.wyscanserver = WYScanServer(strBusName='com.wyplay.wyscan', strPathName='/com/wyplay/WyScan', strWyDbusInstanceName='com.wydbus.wyscan_4_gui')
		else:
			log.debug("WyScanServer can't be found, tv setup parameters are disabled.")
		return None



def wyscanserver():
	return _WyScanServerWrap().wyscanserver

def getitem(menu):
	if wyscanserver() is None:
		return None
	return TVSetupParametersItem(_('TV'), 'tv', display_type='setup_tv', menu=menu)

class TVSetupParametersItem(GenericContainer):
	def browse(self):
		from .tvsetup import EPGMarginItem, TNTScanMenuSetupItem, ExternalAntenna
		return [EPGMarginItem('tv', 'epg_margin', config.HMI_TV['epg_margins'], 'Time record margins', type_='setupitem'), TNTScanMenuSetupItem('Channel search', type_='setupitem', menu=self.menu), ExternalAntenna('tv', 'lnb_high_voltage', (True, False), 'External antenna', type_='setupitem')]

	def update_name(self):
		self._name = _('TV')



